<div class="ibox-content">
    <form action="{:url('config/configAdd')}" method="post" class="form-horizontal">
        <div class="box">
            <div class="box-body">
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('name')}</label>
                    <div class="col-sm-10"><input class="form-control " name="name" placeholder="{:lang('please enter the configuration name')}"
                                                  value="{$info['name']|default=''}" type="text">
                        <span class="help-block m-b-none">（{:lang('can only be used in english and cannot be duplicated')}）</span></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('configure title')}</label>
                    <div class="col-sm-10">
                        <input class="form-control " name="title" placeholder="{:lang('configure title')}"
                               value="{$info['title']|default=''}" type="text">
                        <span class="help-block m-b-none">（{:lang('configuration title for backend display')}）</span></div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('configuration type')}</label>
                    <div class="col-sm-10">
                        <select name="type" class="form-control">
                            {volist name='config_type_list' id='type'}
                            <option value="{$key}">{$type}</option>
                            {/volist}
                        </select>
                        <span class="help-block m-b-none">（{:lang('the system will parse configuration values based on different types')}）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('configure grouping')}</label>
                    <div class="col-sm-10">
                        <select name="group" class="form-control">
                            <option value="0">{:lang('not grouped')}</option>
                            {volist name='config_group_list' id='group'}
                            <option value="{$key}">{$group}</option>
                            {/volist}
                        </select>
                        <span class="help-block m-b-none">（{:lang('configure grouping remarks')}）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('configuration value')}</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" name="value" rows="3" placeholder="{:lang('please enter the configuration value')}">{$info['value']|default=''}</textarea>
                        <span class="help-block m-b-none">（{:lang('configuration values')}）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('configuration items')}</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" name="extra" rows="3" placeholder="{:lang('configuration items')}">{$info['extra']|default=''}</textarea>
                        <span class="help-block m-b-none">（{:lang('if it is an enumeration type, this item needs to be configured')}）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('descriptive information')}</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" name="describe" rows="3" placeholder="{:lang('descriptive information')}">{$info['describe']|default=''}</textarea>
                        <span class="help-block m-b-none">（{:lang('descriptive information')}）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">{:lang('sort')}</label>
                    <div class="col-sm-10">
                        <input class="form-control" name="sort" placeholder="{:lang('sort')}"
                               value="{$info['sort']|default='0'}" type="text">
                        <span class="help-block m-b-none">（{:lang('order used for grouping display')}）</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
                <div class="col-sm-offset-2 col-sm-8">
                    <button type="submit" class="btn  btn-info no-repeat-button ajax-post" data-style="slide-up"
                            target-form="form-horizontal" data-loading-text="Loading...">
                        <span class="ladda-label"><i class="fa fa-send"></i>{:lang('确定')}</span>
                    </button>
                </div>
            </div>
        </div>
    </form>
</div>
